package be.tihh.mgmt.gui.xml.computers;

import be.tihh.mgmt.tasks.Task;

import java.util.ArrayList;

public class Computer {

    String name;
    String id;
    String macAddress;
    ArrayList<Task> tasks;

    public Computer() {
    }

    public Computer(String name, String id) {
        this.name = name;
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMacAddress() {
        return macAddress;
    }

    public void setMacAddress(String macAddress) {
        this.macAddress = macAddress;
    }

    public ArrayList<Task> getTasks() {
        if(tasks ==null){
            //todo : read task queue from previous session (saved in xml?)
            tasks = new ArrayList<Task>();
        }

        return tasks;
    }

    @Override
    public String toString() {
        return name;
    }
}
